import api from '@/utils/request'


export const getTodoList = (data: any) => {
    return api.post('/WorkFlow/task-handle/getTodoList', data)
}

export const getTodoList2 = (data: any) => {
    return api.post('/WorkFlow/task-handle/getTodoList2', data)
}

// 获取可驳回的节点列表
export const getBackNodesByProcessInstanceId = (processInstanceId: any, taskId: any) => {
    return api.get('/WorkFlow/task-handle/getBackNodesByProcessInstanceId/' + processInstanceId + '/' + taskId)
}

// 获取审批历史
export const getCheckHistoryLog = (processInstanceId: string) => {

    return api.get('/WorkFlow/task-handle/commentsByProcessInstanceId?processInstanceId=' + processInstanceId)

}

// 驳回审批
export const rejectTask = (data: any) => {
    return api.post('/WorkFlow/task-handle/reject', data)
}

// 同意审批
export const approveTask = (data: any) => {
    return api.post('/WorkFlow/task-handle/approve', data)
}

// 流程终止
export const stopTask = (data: any) => {
    return api.post('/WorkFlow/task-handle/stop', data)
}

